Various inventions related to pumps have conventionally been proposed. An example of such an invention is a pump including a cylindrical magnet that is externally coated with a resin and a Hall element that detects the positions of magnetic poles of the magnet. More specifically, a brushless motor and a pump including the brushless motor are disclosed. The brushless motor generates a rotating magnetic field by supplying a current to coils in accordance with a signal from a Hall element that detects positions of magnetic poles of a magnet. Magnet projections are provided on the end surface of the magnet on the side of a Hall element (see, for example, Patent Literature 1). In the pump described in Patent Literature 1, since the magnet projections are provided, the distance between the magnet and the Hall element is reduced. As a result, the magnetic force applied to the Hall element is increased, and does not become insufficient even when the magnet is heated to a high temperature and demagnetized. Consequently, abnormal heating of components of a control unit can be prevented, and normal operation can be continued.